package cn.iocoder.yudao.module.system.api.tenant.dto;

import cn.hutool.core.util.ObjectUtil;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class TenantSaveReqDTO {

    private Long id;

    @NotNull(message = "租户名不能为空")
    private String name;

    @NotNull(message = "联系人不能为空")
    private String contactName;

    private String contactMobile;

    @NotNull(message = "租户状态")
    private Integer status;

    private String website;

    @NotNull(message = "租户套餐编号不能为空")
    private Long packageId;

//    @NotNull(message = "过期时间不能为空")
    private LocalDateTime expireTime;


    private BigDecimal wallet;

    // ========== 仅【创建】时，需要传递的字段 ==========

    @Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成")
    @Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符")
    private String username;

    @Length(min = 4, max = 16, message = "密码长度为 4-16 位")
    private String password;

    private List<Long> channelIdList;

    private String callNumber;

    private Integer authType;


}
